import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, Length } from 'class-validator';

export class LoginDto {
  @ApiProperty({ description: '用户名' })
  @IsNotEmpty({ message: '用户名不能为空！' })
  @Length(1, 50)
  username: string;

  @ApiProperty({ description: '用户密码' })
  @Length(1, 50)
  @IsNotEmpty({ message: '密码不能为空！' })
  password: string;
}
